home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Demos / Commander Demo / Commander 2.0.1 Demo / Commander 2.0.1 Demo.rsrc / TEXT_5128_File.txt < prev    next >
Encoding:
Text File  |  1994-08-15  |  1.3 KB  |  42 lines

  1. ¬†File (file pointer) -> Number
  2. ¬†File (field pointer) -> Pointer
  3. ¬†File (file number) -> Pointer
  4.                                                                                     Pg 43-5
  5.  
  6. file number        Number      File number
  7. file pointer        Pointer       Pointer to a file
  8. field pointer      Pointer       Pointer to a field
  9.  
  10.  
  11. File has three different forms.
  12.  
  13. If passed file number, File returns a pointer to the file. 
  14.  
  15. If passed file pointer, File returns the file number of the file. 
  16.  
  17. If passed field pointer, File returns the file number of the field. This form is used with the first form of Field to get the file number and field number of a field by using only a field pointer.
  18.  
  19.  
  20. The following example sets the FilePtr variable to a pointer to the third file:
  21.  
  22.         FilePtr := File (3)
  23.  
  24. Passing FilePtr to the second form of File returns the number 3. For example, the following line sets FileNum to 3:
  25.  
  26.         FileNum := File (FilePtr) 
  27.  
  28.  
  29. The following example sets the FileNum variable to the file number of [File3¬ª]
  30.  
  31.         FileNum := File (¬ª[File3])
  32.  
  33.  
  34. The following example sets the FileNum variable to the file number of the file to which the field named [File3]Field1 belongs:
  35.  
  36.         FileNum := File (¬ª[File3]Field1)
  37.  
  38.  
  39.  
  40. See also: Count¬†files, ¬†Filename
  41.  
  42.